<template>
    <div>
        <h1>姓名: {{ name123 }}</h1>
        <h1>年龄: {{ age }}</h1>
        <h1>住址: {{ address }}</h1>

    
        <button @click="ck">点我改变</button>
    </div>
</template>

<script setup>
import { reactive, toRefs } from 'vue';

const user = reactive({
    name: "张三",
    age: 10,
    address: "武汉"
})

const {name: name123, age, address } = toRefs(user);     

function ck() {
    name123.value += '!!'
}

</script>
